package com.itheima.genericity;

import java.util.ArrayList;

public class generDemo05 {
    public static void main(String[] args) {
        ArrayList<Integer> list1=new ArrayList<>();
        ArrayList<String> list2=new ArrayList<>();
        ArrayList<Number> list3=new ArrayList<>();
        ArrayList<Object> list4=new ArrayList<>();
        getElement1(list1);
        getElement1(list3);
        getElement2(list4);
        getElement2(list3);
    }
    public static void method(ArrayList<?> list){
    }
    public static void getElement1(ArrayList<? extends Number> list){}
    public static void getElement2(ArrayList<? super Number> list){}
}
